-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add trussed-core crate #178
Conversation
@sosthene-nitrokey @daringer Can you have a look this PR? I’d rather not have it open for too long as it touches lots of files and is prone to merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A shame that because the original files are trimmed and not fully deleted, it doesn't show as a rename in the diff. I'm trusting the line count that nothing is missing. |
I’ve also tested this against nitrokey-3-firmware so I’m pretty sure that nothing is missing. But every rebase risks losing something. :( I’ll merge it now – updating the other PRs is hopefully trivial because |
Yes, updating these PRs will be much easier than rebasing this one. |
This PR adds the trussed-core crate (#177) and moves the relevant modules fully or partially to it:
api
client
(only*Client
and mechanism traits as well as error and result types)config
(only relevant constants)error
interrupt
serde_extensions
(only client traits and error and result types)types
(only those types used by other modules)All moved types are re-exported from their old locations, so this is a compatible change for Trussed’s dependents.
As the extension request and reply serialization and deserialization is now split between(Edit: now done in #179)trussed-core
andtrussed
, I’ve added serialization and deserialization methods to theExtension
trait so thattrussed
does not need to make assumptions about the serialization mechanism used bytrussed-core
.We will probably want to make some more adjustments before releasing. This PR only intends to perform the split with minimal modifications.